package com.md.youyouhui.net.repo;

import android.arch.lifecycle.LiveData;

import com.md.youyouhui.common.Resource;
import com.md.youyouhui.net.ApiServiceFac;
import com.md.youyouhui.net.response.LoginResponse;
import com.md.youyouhui.utils.calladapter.ResourceConvertUtils;

/**
 * Created by AdministratorZJ
 * on 2018/5/25.
 */

public class LoginRepo {
    private static LoginRepo INSTANCE;

    public static LoginRepo newInstance() {
        if (null == INSTANCE) {
            INSTANCE = new LoginRepo();
        }
        return INSTANCE;
    }


    public LiveData<Resource<LoginResponse>> login(int type, String phone, String vcode, String pwd, String source) {

        return ResourceConvertUtils.convertResource(ApiServiceFac.get().login(type, phone, vcode, pwd, source));
    }


}
